import re, os
from website.website_base import WebSiteBase, FetchQueueItem, WebSiteDb
from bs4 import BeautifulSoup
from lib.log import DBG, INFO, ERROR, EXCEPTION
from lib.sqlite_ext import DBApiExt
from website.homeweb.homeweb import Homeweb

class Avlm(Homeweb):
    """
    """
    INDEX_URL = "https://www.avlm2.ink"
    cmdpath = os.path.abspath(os.getcwd())
    DB = os.path.join(cmdpath, "website", "avlm", "avlm.db")
    SAVE_DIR = os.path.join(cmdpath, "website", "avlm", "page")

    def __init__(self):
        super().__init__()

    @classmethod
    def _class_config(cls):
        """
        获取所有分类首页url列表

        :return:
        """

        class_list = [
            {"name": "国产视频", "id": "20"},
            {"name": "日韩有码", "id": "21"},
            {"name": "日韩无码", "id": "22"},
            {"name": "制服学生", "id": "23"},
            {"name": "动漫卡通", "id": "24"},
            {"name": "欧美变态", "id": "25"},
            {"name": "三级伦理", "id": "26"}
        ]

        return class_list

    def _parse_class_page_a_list_content(self, soup):
        lis = soup.select(".stui-vodlist__item")
        return lis


